import Cookies from 'js-cookie'

const TokenKey = 'blog_token'
const LoginState = 'blog_login_state'
const SessionId = 'blog_sessionId'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getLoginState() {
  return Cookies.get(LoginState)
}

export function setLoginState(loginState) {
  return Cookies.set(LoginState, loginState)
}

export function removeLoginState() {
  return Cookies.remove(LoginState)
}

export function getSessionId() {
  return Cookies.get(SessionId)
}

export function setSessionId(sessionId) {
  return Cookies.set(SessionId, sessionId)
}

export function removeSessionId() {
  return Cookies.remove(SessionId)
}
